package edu.uclm.esi.tysw.tusEntradas.acciones;

import java.sql.SQLException;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

import edu.uclm.esi.tysw.tusEntradas.domain.Recintos;

public class ListaRecintos extends ActionSupport {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	//private String nombre;
	private Exception exception;
	
	private Recintos recinto=new Recintos();
	
	public String execute() {
		try {
			//TODO implementar
			recinto.getAllRecintos();			
			ActionContext.getContext().getSession().put("listaCompletaRecintos",  recinto);			
			return SUCCESS;
		} catch (SQLException e) {
			this.exception=e;
			return ERROR;
		} 
	}

	public void setException(Exception exception) {
		this.exception = exception;
	}

	public Exception getException() {
		return exception;
	}
}
